package view.factory
{
	import mx.containers.Canvas;
	import mx.controls.Button;
	import mx.core.UIComponent;

	public class ControlsFactory
	{
		public function ControlsFactory()
		{
		}
		
		/**
		 * 创建字符串
		 **/
		public static function createButton(labelStr:String):Button
		{
			var button:Button = new Button();
			button.label = labelStr;
			button.styleName = "widthButton";
			return button;
		}
		
		/**
		 *  创建工具栏 
		 **/
		public static function createElectricBoundaryTool():Canvas
		{
			var uiContainer:Canvas = new Canvas();
			uiContainer.graphics.lineStyle(5);
			uiContainer.graphics.beginFill(0);
			uiContainer.graphics.drawCircle(0, 50, 5);
			uiContainer.graphics.endFill();
			uiContainer.addElement( createButton("OK") );
			return uiContainer;
		}
		
		/**
		 * 创建工具提示框
		 **/
		public static function createTooltip():UIComponent
		{
			return null;
		}
	}
}